package com.itheima.clientAndService01;

import java.util.*;

public class ArgsClass03 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("aaa");
        list.add("bbb");
        list.add("ccc");
        list.stream().forEach(s -> System.out.println(s));
        System.out.println("---------------------------");
        List.of("a", "b", "c").stream().forEach(s -> System.out.println(s));
        System.out.println("---------------------------");
        HashSet<String> hs = new HashSet<>();
        hs.add("aaa");
        hs.add("bbb");
        hs.add("ccc");
        hs.stream().forEach(s -> System.out.println(s));
        System.out.println("---------------------------");
        Set.of("a", "b", "c").stream().forEach(s -> System.out.println(s));
        System.out.println("---------------------------");
        HashMap<String, Integer> map = new HashMap<>();
        map.put("cuihua", 23);
        map.put("dachui", 23);
        map.put("qiuxiang", 22);
        map.keySet().stream().forEach(s -> System.out.println(s));
        System.out.println("---------------------------");
        Map.ofEntries(Map.entry("zhangsan",23),Map.entry("lisi",24))
                .entrySet().stream().forEach(s -> System.out.println(s));
        System.out.println("---------------------------");
        map.entrySet().stream().forEach(s -> System.out.println(s));
        System.out.println("---------------------------");
        int[] arr = {1, 2, 3, 4, 5};
        Arrays.stream(arr).forEach(s -> System.out.println(s));
    }
}
